package fi.solita.dojo.mazeserver.game

import fi.solita.dojo.mazeserver.game.internal._
import fi.solita.dojo.mazeserver.map._

object GameAction {
	def allActions(): List[GameAction] = List(Move1(),
			Move2(),
			Move3(),
			TurnRight(), 
			MoveBack(), 
			TurnLeft(), 
			DoNothing())
}

abstract sealed class GameAction(command: String){
	override def toString() = command
}

abstract case class MoveAction(command: String) extends GameAction(command) {}

case class Move1() extends MoveAction("1") {}
case class Move2() extends MoveAction("2") {}
case class Move3() extends MoveAction("3") {}
case class TurnRight() extends MoveAction("r") {}
case class TurnLeft() extends MoveAction ("l") {}
case class MoveBack() extends MoveAction ("b") {}


case class DoNothing() extends GameAction("") {
	def execute(p: Player): Player = p
}

